module.exports = (app)=>{
    const mongoose = app.mongoose
    const Schema = mongoose.Schema;
    const CommentsSchema = new Schema({
        videoid:{
            type:mongoose.Schema.Types.ObjectId,
            ref:'Video',
            required:true
        },
        userid:{
            type:mongoose.Schema.Types.ObjectId,
            ref:'User',
            required:true
        },
        content:{
            type:String,
            required:true
        },
        create_time:{
            type:Date,
            default:Date.now
        }
    })

    return mongoose.model('Comments',CommentsSchema)
}